<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>contains | share-open</title>
    <meta name="description" content="函数库，工具库">
    <link rel="stylesheet" href="/share-open/assets/style.9e794c8c.css">
    <link rel="modulepreload" href="/share-open/assets/examples_contains_base.md.425dae8f.js">
    <link rel="modulepreload" href="/share-open/assets/app.a4ee4820.js">
    <link rel="modulepreload" href="/share-open/assets/string_contains.md.1ec937b8.lean.js">
    
    <link rel="icon" href="/share-open/favicon.ico">
  <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
  <meta name="keywords" content="@minionorg,share,函数库,工具库">
  <meta name="twitter:title" content="contains | share-open">
  <meta property="og:title" content="contains | share-open">
  </head>
  <body>
    <div id="app"><div class="layout"><header class="layout-header-wrap clearfix"><div class="logo"><a href="/share-open/">Chestnut-CLI</a></div><ul class="menu-navs clearfix"><li class="nav-item"><a href="/share-open/guide/introduction">指南</a></li><li class="nav-item"><a href="/share-open/feature/code-style">功能</a></li></ul></header><div class="layout-main"><div class="layout-siderbar"><div class="withoutScroll siderbar-wrap"><ul class="siderbar"><!--[--><!--]--></ul></div></div><div class="layout-container"><div class="content chestnut-doc"><div style="position:relative;"><div><h2 id="contains" tabindex="-1">contains <a class="header-anchor" href="#contains" aria-hidden="true">#</a></h2><div class="language-js"><pre><code><span class="token function">contains</span><span class="token punctuation">(</span>target<span class="token operator">:</span> string<span class="token punctuation">,</span> <span class="token literal-property property">str</span><span class="token operator">:</span> string<span class="token punctuation">,</span> separator<span class="token operator">?</span><span class="token operator">:</span> string<span class="token punctuation">)</span>
</code></pre></div><p>判断字符串里面是否包括目标字符串</p><h3 id="参数" tabindex="-1">参数 <a class="header-anchor" href="#参数" aria-hidden="true">#</a></h3><ul><li><!----> target — 字符串</li><li><!----> str — 将要匹配的字符串</li><li><!----> [separator] — 分隔符</li></ul><h3 id="返回值" tabindex="-1">返回值 <a class="header-anchor" href="#返回值" aria-hidden="true">#</a></h3><ul><li><!----> 是否包括</li></ul><h3 id="案例" tabindex="-1">案例 <a class="header-anchor" href="#案例" aria-hidden="true">#</a></h3><!----></div></div><div class="layout-antorns"><div class="antorns-wrap"><div class="antorn-container"><div class="antorn-line"><span style="top:8px;" class="antorn-line-i"></span></div><ul class="antorn-list"><!--[--><li class=""><a data-href="#contains" href="#contains">contains</a></li><li class=""><a data-href="#参数" href="#参数">参数</a></li><li class=""><a data-href="#返回值" href="#返回值">返回值</a></li><li class=""><a data-href="#案例" href="#案例">案例</a></li><!--]--></ul></div></div></div></div></div></div><div class="footer" data-v-7c92cd43><div class="container" data-v-7c92cd43><div class="footer-main" data-v-7c92cd43><h5 data-v-7c92cd43>Chestnut Design</h5><!--[--><a href="https://github.com/bnuephjx/conventional-changelog-chestnut.git" class="footer-main-link" target="_blank" data-v-7c92cd43><span data-v-7c92cd43>Conventional Changelog Chestnut</span><span class="sub" data-v-7c92cd43> - </span><span class="sub" data-v-7c92cd43>日志模板</span></a><a href="http://bnuephjx.gitee.io/cheatnut-chart-docs-test" class="footer-main-link" target="_blank" data-v-7c92cd43><span data-v-7c92cd43>Chestnut Chart</span><span class="sub" data-v-7c92cd43> - </span><span class="sub" data-v-7c92cd43>3D图表库</span></a><a href=" http://bnuephjx.gitee.io/test_pages" class="footer-main-link" target="_blank" data-v-7c92cd43><span data-v-7c92cd43>Chestnut UI</span><span class="sub" data-v-7c92cd43> - </span><span class="sub" data-v-7c92cd43>未发布可查看</span></a><!--]--></div><div class="footer-main" data-v-7c92cd43><h5 data-v-7c92cd43>社区</h5><a href="https://github.com/ChestnutChina/chestnut-cli/issues" class="footer-main-link" target="_blank" data-v-7c92cd43>问题收集</a></div><div class="footer-main" data-v-7c92cd43><h5 data-v-7c92cd43>友情链接</h5><a href="https://vue3js.cn/docs/zh/" class="footer-main-link" target="_blank" data-v-7c92cd43>Vue</a><a href="https://cli.vuejs.org/" class="footer-main-link" target="_blank" data-v-7c92cd43>Vue CLI</a></div></div><p class="for-the-record" data-v-7c92cd43><img alt="NPM" src="https://img.shields.io/npm/l/chestnut-cli?color=%231890ff&amp;registry_uri=https%3A%2F%2Fregistry.npmjs.com&amp;style=flat-square" data-v-7c92cd43><img alt="Copyright" src="https://img.shields.io/badge/©-Copyright 2021 Chestnut CLI-1890ff?style=flat-square&amp;logo=copyright&amp;logoColor=white" data-v-7c92cd43></p></div></div></div>
    <script>__VP_HASH_MAP__ = JSON.parse("{\"arrayutils_add.md\":\"374ceb04\",\"arrayutils_addall.md\":\"73035b27\",\"arrayutils_clone.md\":\"34e90860\",\"arrayutils_remove.md\":\"ef302334\",\"charutils_compare.md\":\"b89ea2fd\",\"charutils_isascii.md\":\"737bb5d9\",\"charutils_isasciialpha.md\":\"29b5537f\",\"charutils_isasciialphalower.md\":\"5f389eb4\",\"charutils_isasciialphaupper.md\":\"ac124a38\",\"charutils_isasciialphanumeric.md\":\"25f49ab7\",\"charutils_isasciicontrol.md\":\"41c75ba3\",\"charutils_isasciinumeric.md\":\"bbfb07cc\",\"charutils_isasciiprintable.md\":\"2216d737\",\"charutils_iswhitespace.md\":\"6de0e03a\",\"charutils_tochar.md\":\"5b7eed00\",\"charutils_tointvalue.md\":\"2ec8007e\",\"charutils_unicodeescaped.md\":\"71c2a79e\",\"charutils_unicodeunescaped.md\":\"e2b1347f\",\"dateutils_dateformathoc.md\":\"5cd44b8a\",\"dateutils_isdate.md\":\"6bd3cd9b\",\"dateutils_istime.md\":\"520d5662\",\"dateutils_timeformathoc.md\":\"dc49c69e\",\"numberutils_isfloat.md\":\"2e725baa\",\"numberutils_isinteger.md\":\"f8eeee7a\",\"stringutils_abbreviate.md\":\"1524f4a6\",\"stringutils_equals.md\":\"06357ac6\",\"stringutils_equalsany.md\":\"9bd65dfe\",\"stringutils_equalsanyignorecase.md\":\"56a73225\",\"stringutils_equalsignorecase.md\":\"6f7772ac\",\"stringutils_isempty.md\":\"0096bbd1\",\"stringutils_length.md\":\"2d66e3be\",\"stringutils_ltrim.md\":\"2f4aec6e\",\"stringutils_rtrim.md\":\"d627fb9a\",\"stringutils_startswith.md\":\"433754c4\",\"stringutils_strip.md\":\"a25972bb\",\"stringutils_stripall.md\":\"41692a93\",\"stringutils_stripend.md\":\"3971b35d\",\"stringutils_stripstart.md\":\"93ba93a3\",\"stringutils_striptoempty.md\":\"74075c61\",\"stringutils_striptonull.md\":\"21d5b7ed\",\"stringutils_substring.md\":\"e1bdc77b\",\"stringutils_substringafter.md\":\"dcc4756a\",\"stringutils_substringafterlast.md\":\"4107c803\",\"stringutils_substringbefore.md\":\"331ece7e\",\"stringutils_substringbeforelast.md\":\"7550ca2a\",\"stringutils_substringbetween.md\":\"a11ca124\",\"stringutils_substringsbetween.md\":\"d2ed3873\",\"stringutils_trim.md\":\"e9f1f51d\",\"stringutils_trimtoempty.md\":\"c1dd8306\",\"stringutils_trimtonull.md\":\"5dbd3aa3\",\"stringutils_truncate.md\":\"77189625\",\"stringutils_wrap.md\":\"85a2e0ac\",\"stringutils_wrapifmissing.md\":\"9a49dd9e\",\"utils_isipv4.md\":\"9f22bf94\",\"utils_isipv4range.md\":\"5874c542\",\"utils_isipv6.md\":\"a16fe65f\",\"utils_isipv6range.md\":\"3c22a359\",\"utils_isport.md\":\"cf3e2fc5\",\"examples_contains_base.md\":\"425dae8f\",\"feature_createtype.md\":\"c429beb7\",\"guide_faq.md\":\"41594302\",\"guide_introduction.md\":\"5a294b40\",\"guide_quickstart.md\":\"ae8a5f36\",\"index.md\":\"20776e6e\",\"string_contains.md\":\"1ec937b8\",\"string_getstringlength.md\":\"b2c912c9\",\"string_isen.md\":\"facc7b4c\",\"string_iszh.md\":\"23880b49\",\"string_ltrim.md\":\"1d4c65a3\",\"string_rtrim.md\":\"f0328b2a\",\"string_trim.md\":\"13994b7c\",\"string_uppercase.md\":\"33c776a8\"}")</script>
    <script type="module" async src="/share-open/assets/app.a4ee4820.js"></script>
    
  </body>
</html>